<?php
/**
 * 页头部分，根据变量显示标题
 * 根据用户是否登录显示切换登录和退出
 */
?>
<!DOCTYPE html>
<html lang="zh">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title><?php echo (isset($pageTitle)) ? $pageTitle : 'Some Content Site'; ?></title>
	<script src="js/custom-jquery.js"></script>
	<script src="js/custom-jquery.js"></script>
	<link rel="stylesheet" href="css/base.css">
	<link rel="stylesheet" href="css/fonts/fonts.css">
	<link rel="stylesheet" href="css/main.css">
	<!--[if lt IE 8]>
	<link rel="stylesheet" href="css/ie6-7.css">
	<![endif]-->
</head>
<!-- # header.inc.php - Script 9.1 -->
<body>
	<header>
		<h1>Content Site<span>Home to lots of great content!</span></h1>
		<nav>
			<ul>
				<li><a href="index.php">Home</a></li>
				<li><a href="#">Archives</a></li>
				<li><a href="contact.php">Contact</a></li>
				<li><?php if ($user) { echo '<a href="logout.php">退出</a>'; } else { echo '<a href="login.php">登录</a>'; } ?></li>
				<li><a href="#">注册</a></li>
			</ul>
			</nav>
	</header>